import { mdPlugin } from "./plugins";
const sidebar = {
  "/widgets/": [
    {
      text: "组件",
      items: [
        { text: "checkbox", link: "/widgets/checkbox" },
        { text: "checkboxes", link: "/widgets/checkboxes" },
        { text: "color", link: "/widgets/color" },
        { text: "date", link: "/widgets/date" },
        { text: "dateRange", link: "/widgets/dateRange" },
        { text: "html", link: "/widgets/html" },
        { text: "imageInput", link: "/widgets/imageInput" },
        { text: "input", link: "/widgets/input" },
        { text: "number", link: "/widgets/number" },
        { text: "percentSlider", link: "/widgets/percentSlider" },
        { text: "radio", link: "/widgets/radio" },
        { text: "rate", link: "/widgets/rate" },
        { text: "select", link: "/widgets/select" },
        { text: "slider", link: "/widgets/slider" },
        { text: "switch", link: "/widgets/switch" },
        { text: "textArea", link: "/widgets/textArea" },
        { text: "time", link: "/widgets/time" },
        { text: "timeRange", link: "/widgets/timeRange" },
        { text: "treeSelect", link: "/widgets/treeSelect" },
        { text: "upload", link: "/widgets/upload" },
        { text: "urlInput", link: "/widgets/urlInput" },
      ],
    },
  ],
  "/uses/": [
    {
      text: "使用",
      items: [{ text: "安装", link: "/uses/index" }],
    },
  ],
};
const nav = [
  {
    activeMatch: `^/(widgets)/`,
    text: "组件",
    link: "/widgets/checkbox",
  },
  {
    activeMatch: `^/(uses)/`,
    text: "使用",
    link: "/uses/index",
  },
];

export default {
  lang: "zh-CN",
  title: "无赖",
  description: "Vite & Vue powered static site generator.",
  lastUpdated: true,
  markdown: {
    theme: "material-theme-palenight",
    lineNumbers: false,
    anchor: {
      renderPermalink: "",
    },
    config: (md) => {
      mdPlugin(md);
    },
  },
  srcDir: "./src",
  outDir: "./public",
  themeConfig: {
    baseUrl: "/",
    editLinks: true,
    editLinkText: "在 GitHub 上编辑此页面",
    lastUpdatedText: "上次更新",
    outlineTitle: "本页目录",
    docFooter: {
      prev: "前一篇",
      next: "下一篇",
    },
    nav,
    sidebar,
  },
};
